<? ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
            <?php __('All Brazil - Recursos Humanos'); ?>
            <?php // echo $title_for_layout; ?>
        </title>

<link href="css/style.css" rel="stylesheet" type="text/css" />
 
	<script type="text/javascript">
		var WWW_ROOT = '<?= $this->Html->url('/') ?>';
    </script>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>

	<?php
    echo $this->Html->css('style');
    echo $this->Html->css('orbit');

    echo $this->Html->script('jquery');	
    echo $this->Html->script('modernizr');
	
	echo $this->Html->script('jscripts/tiny_mce/tiny_mce');
	
	echo $this->Html->script('jquery.orbit-1.2.3.min');
	echo $this->Html->script('jquery-1.5.1.min');
	
	echo $this->Html->script('qtip/jquery-1.3.2');
    echo $this->Html->script('jquery/jquery');
	echo $this->Html->script('jquery.orbit-1.2.3.min');    
    
	echo $this->Html->script('jquery.masked.input');
	echo $this->Html->script('jquery.mask.money');
	
	echo $this->Html->css('orbit-1.2.3');
	echo("\n");
    echo $this->Html->script('jquery-1.5.1.min');
    echo $this->Html->script('jquery.orbit-1.2.3');
    echo("\n");

    ?>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
	<script>
		$(document).ready(function() {
			$("#tabs").tabs();
			$('.cpf').mask("999.999.999-99");
			/*$('.rg').mask("99.999.999-9");*/
			$('.data').mask("99-99-9999");
			$('.dependentes').mask("99");
			$('.telefone').mask("(99)9999-9999");
			$('.cep').mask("99999-999");
			$('.dinheiro').maskMoney({
                showSymbol:false,
                symbol:'', 
                decimal:'.', 
                thousands:'',
                precision:2
        	});
		});
    </script>
	
  
	<script type="text/javascript">
        function clickPesquisa(operacao, input)
        {
            
            switch(input)
            {
                default:
                break;
                
                case "pesquisa":
                    if(operacao==0)
                    {
                        if($("#PesquisaConteudo").val()=="pesquisa interna")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#PesquisaConteudo").val("");
                        }
                    }
                    else if(operacao==1)
                    {
                        if($("#PesquisaConteudo").val()=="")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#PesquisaConteudo").val("pesquisa interna");
                        }
                    }				
                break;
                
                
                
                case "usuario":
                    if(operacao==0)
                    {
                        if($("#usuario").val()=="usuário")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#usuario").val("");
                        }
                    }
                    else if(operacao==1)
                    {
                        if($("#usuario").val()=="")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#usuario").val("usuário");
                        }
                    }				
                break;
            
            
            case "senha":
                    if(operacao==0)
                    {
                        if($("#senha").val()=="senha")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#senha").val("");
                        }
                    }
                    else if(operacao==1)
                    {
                        if($("#senha").val()=="")
                        {
                            //alert($("#PesquisaConteudo").val());
                            $("#senha").val("senha");
                        }
                    }				
                break;
            }
                
            
        }
    </script>
    <script language="javascript">
		$(document).ready(function (){
			$("#flashMessage").delay(2000).fadeOut(800);
            $("#InformativoNome").focus(TextoNomeURL).blur(TextoNomeURL);
            $("#InformativoMail").focus(TextoMailURL).blur(TextoMailURL);
            $("#PesquisaConteudo").focus(TextoPesquisaURL).blur(TextoPesquisaURL);
            $("#flashMessage").delay(2000).fadeOut(800)
        });
 
        function TextoNomeURL(){
            if (this.value == "")
                this.value = "nome";
            else if (this.value == "nome")
                this.value = "";
        }
        
        function TextoMailURL(){
            if (this.value == "")
                this.value = "e-mail";
            else if (this.value == "e-mail")
                this.value = "";
        }
        
        function TextoPesquisaURL(){
            if (this.value == "")
                this.value = "pesquisa interna";
            else if (this.value == "pesquisa interna")
                this.value = "";
        }
    </script>
</head>

<body>

<center>
   <?php
        echo $this->Session->flash();
    ?>
</center>
	<!-- header  -->
	<div id="header">
       <!-- logo  --> 
      <div id="logo">
		<a href="<?= 'http://'.$_SERVER['SERVER_NAME'] ?>" title="All Brazil - Recursos Humanos"><?= $this->Html->image("logo.png", array("alt" => "All Brazil")); ?></a>
      </div>
      <!-- menu  -->
		<div id="menu">
            <ul id="topnav">
                <?php
                    foreach ($categorias as $menu):
                        if( $menu['status'] == 1 ){
                            $link = 'JavaScript:void(0);';
                            if( $menu['pagina_id'] != 0 )
                                $link = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].'paginas/index/'.$menu['pagina_id'].'/'.$menu['nome'];
            
                            if( $menu['url'] != '' && $menu['url'] != null )
                                $link = 'http://'.str_replace('http://', '', str_replace('{url_do_site}', $_SERVER['SERVER_NAME'], $menu['url']));
            
                             echo '<li class="superior"><a class="ancora_menu" href="'.$link.'">'.$menu['nome'].'</a>';
                             echo $this->element("categorias_children", array("categoria" => $menu));
                             echo '</li>';
                        }
                     endforeach;
                 ?>
            </ul>    
		</div>
      <!-- network  -->  
		<div id="network">
            <h1 style="margin-bottom:6px">Siga-nos</h1>
            <a href="<?= $facebook; ?>" title="facebook"><?= $this->Html->image("facebook.png", array("alt" => "facebook")); ?></a>
            <a href="<?= $twitter; ?>" title="twitter"><?= $this->Html->image("twitter.png", array("alt" => "twitter")); ?></a>
		</div> 
	</div>
<div id="content-main">
    <div id="content">
        <div id="slide-show">
            <div id="featured">
            <?
            
		/*	foreach($banner_topo as $ban)
			{
				echo("<a href=".$ban['Banner']['link'].">".$this->Html->image($ban['Banner']['arquivo'], array("alt" => "twitter"))."</a>");
				print_r($ban);
			}*/
			
			?>
                <a href=""><?= $this->Html->image("slide.png"); ?></a>
                <a href=""><?= $this->Html->image("slide2.png"); ?></a>
                <a href=""><?= $this->Html->image("slide3.png"); ?></a>
            </div>
            <script>
			jQuery(document).ready(function($) {
				
				$('#featured').orbit({
				"bullets" : true,
				"animation" : "horizontal-push"
			  });
			
				/* TABS --------------------------------- */
					var tabs = $('dl.tabs');
					tabsContent = $('ul.tabs-content')
			
					tabs.each(function(i) {
					//Get all tabs
					var tab = $(this).children('dd').children('a');
					tab.click(function(e) {
			
						//Get Location of tab's content
						var contentLocation = $(this).attr("href")
						contentLocation = contentLocation + "Tab";
			
						//Let go if not a hashed one
						if(contentLocation.charAt(0)=="#") {
			
							e.preventDefault();
			
							//Make Tab Active
							tab.removeClass('active');
							$(this).addClass('active');
			
							//Show Tab Content
							tabsContent.children('li').css({"display":"none"});
							$(contentLocation).css({"display":"block"});
			
						}
					});
				});
			
			});
			</script>
		</div>
        <div id="pesquisar">
            <div id="pesquisar-curtir">
            <a href="https://twitter.com/share" class="twitter-share-button" data-lang="pt">Tweetar</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.allbrazil.com.br&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; margin-left:-30px; width:55px; height:21px;" allowTransparency="true"></iframe>
            </div>
            <div id="form-pesquisar">
                 <?php echo $this->Form->create('Paginas', array('action' => 'pesquisa', 'class'=>"form-busca") ); ?>
                    <?php echo $this->Form->input('Pesquisa.conteudo', array('label' =>false, 'class' => 'sprocura', 'onclick' => 'clickPesquisa(0, "pesquisa");', 'onblur' => 'clickPesquisa(0,"pesquisa");', 'div' =>false, 'maxlength'=>255, 'value'=>'pesquisa interna')); ?>
            </div>
            <div id="btn-pesquisar">
                <input name="btn-pesquisar" type="submit" value="pesquisar" />
                <?php echo $this->Form->end(); ?>
            </div>
      	</div>
		<?php
			// start content
			echo $content_for_layout;
			//end content
		?>
        <div id="ultimas-news">
			<div id="ultimas-news_1">
				<?= $this->Html->image("ultimas-news.png", array("alt" => "curtir")); ?>
				<h2>+</h2><a href="/paginas/noticias" title="+ Mais Notícias">Mais Notícias</a>
			</div>
            <!-- ultimas-noticias -->
        <?
		if(count($paginas) > 0)
		{
			foreach ($noticias as $noticia)
			{
		
		?>     
         <div id="ultimas-news_2">
         	<h1><?= $noticia['Pagina']['titulo']; ?></h1>
			<p><?= substr($noticia['Pagina']['descricao'], 0, 115); ?>[...]</p>
			<h2>+</h2><?= $this->Html->link('Leia mais!', array('controller' => 'paginas', 'action' => 'index', $noticia['Pagina']['id']), array('escape' => false));?>
        </div>
        <?
			}
		}
		?>
        </div>
    <!-- end ultimas-noticias -->
        </div>

</div>

<div id="footer">
    <div id="footer-interno">
        <p>
        	© 2012 - Desenvolvido por:<?= $this->Html->link($this->Html->image("logo-rjhost.jpg", array('class'=>'rj_host')), 'http://www.rjhost.com.br', array('escape' => false));?>
        </p>
    </div>
</div>
</body>
</html>